{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo $this->createWebUrl('slide',array('op'=>'display'));}">幻灯片管理</a></li>
</ul>
<style>
    .photo_list {
        padding: 15px 0;
    }

    .photo_list .alert {
        width: auto;
        margin-top: 10px;
        overflow: hidden;
        background-color: #ECECEC
    }

    .photo_list .photo_preview {
        width: 130px;
    }

    .photo_list .photo_preview img {
        width: 130px;
        margin-bottom: 5px;
    }

    .photo_list .photo_preview label {
        padding: 0;
    }

    .photo_list .photo_preview input[type="radio"] {
        margin-left: 0;
        margin-right: 10px;
    }

    .photo_list table {
        margin-left: 40px;
    }

    .photo_list table th, .photo_list table td {
        padding-bottom: 5px;
    }

    .photo_list table th {
        width: 60px;
        font-size: 14px;
    }

    .photo_list table input, .photo_list table select {
        margin-bottom: 0;
        border-radius: 5px;
    }
</style>
<div class="main">
    <div class="photo_list">
        <form method="post" class="form">
            <input name="token" type="hidden" value="{$_W['token']}"/>
            {php echo tpl_form_field_multi_image('slide-new');}
            <input type="submit" name="submit" id="selectimage" class="btn" value="保存"/> <span style="color:red;">上传幻灯片后，请保存数据！</span>
            {if $album['type'] == 0}
            <div id="listimage"></div>
            {/if}
            {loop $photos $item}
            <div class="alert alert-block alert-new">
                <input type="hidden" value="{$item['slide']}" name="attachment[{$item['id']}]">
                <span class="pull-right"><a class="delete" onclick="return confirm('删除操作不可恢复，确定码？'); return false;"
                                            href="{php echo $this->createWebUrl('slide', array('op' => 'delete', 'id' => $item['id']))}">删除</a></span>

                <div class="photo_preview pull-left">
                    <label class="radio inline">
                        <img src="{$_W['attachurl']}{$item['slide']}">
                    </label>
                </div>
                <table class="pull-left">
                    <tr>
                        <th>排序</th>
                        <td>
                            <input type="text" style="width:60px;" value="{$item['listorder']}"  name="listorder[{$item['id']}]">
                        </td>
                    </tr>
                    <tr>
                        <th>链接</th>
                        <td>
                            <input type="text" style="width:300px;" value="{$item['url']}" name="url[{$item['id']}]">
                        </td>
                    </tr>
                    <tr>
                        <th><label for="">状态</label></th>
                        <td>
                            <input type="radio" name="isshow[{$item['id']}]" value="1" id="isshow1" {if empty($item) || $item['isshow'] == 1}checked="true"{/if} />显示&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="isshow[{$item['id']}]" value="0" id="isshow3" {if !empty($item) && $item['isshow'] == 0}checked="true"{/if} /> 不显示
                            <span class="help-block"></span>
                        </td>
                    </tr>
                </table>
            </div>
            {/loop}
        </form>
    </div>
</div>
{template 'common/footer'}